import com.shansun.dataobj.ClassDesc;

import mx.rpc.events.ResultEvent;
import mx.rpc.soap.WebService;
import mx.utils.ObjectUtil;

private var classInfoWS:WebService;

public function getClassInfos():void
{
	classInfoWS = new WebService();
	classInfoWS.wsdl = "http://" + _remoteIP + ""
	classInfoWS.useProxy = false;  
	classInfoWS.getServiceList.resultFormat = 'xml'; 
	classInfoWS.getServiceList.addEventListener(ResultEvent.RESULT, fault); 
	classInfoWS.getServiceList.addEventListener(ResultEvent.FAULT, fault); 
	classInfoWS.loadWSDL('http://ws.cdyne.com/emailverify/Emailvernotestemail.asmx?wsdl');  
}

public function deserializeJsonToClassInfo(var jsonStr:String):Array {
	var obj:Object = JsonUtil.deserialize(jsonStr);
	var classInfos:Array = new Array();
	var claInfo:Object = ObjectUtil.getClassInfo(obj);
	var props:Array=claInfo["properties"];
	for each (var q:QName in props) { 
	    var localName:String = q.localName; 
		var clzInfo:ClassDesc = new ClassDesc();
		BeanUtils.copyPropertyToClass(clzInfo, obj[localName]);
		classInfos.push({Name:localName, Class:clzInfo});
	}   
	return classInfos;
}